using System;
using digit.Core;
using System.Data;

namespace SMS.ServiceManager
{
    public class CodeInfo
    {
        #region CONSTRUCTORS
        public CodeInfo()
        {

            this.m_codeID = Util.NULL_INT;
            this.m_codeName = Util.NULL_STRING;
            this.m_codeValue = Util.NULL_STRING;
            this.m_contents = Util.NULL_STRING;
            this.m_codeType = Util.NULL_STRING;
            this.m_info = Util.NULL_STRING;
        }
        public CodeInfo(int codeID, string codeName, string codeValue, string contents, string codeType, string info)
        {

            this.m_codeID = codeID;
            this.m_codeName = codeName;
            this.m_codeValue = codeValue;
            this.m_contents = contents;
            this.m_codeType = codeType;
            this.m_info = info;
        }
        public CodeInfo(DataRow dRow)
        {

            this.m_codeID = (int)Util.ReplaceDBNullTo(dRow["codeID"], Util.NULL_INT);
            this.m_codeName = Util.ReplaceDBNullTo(dRow["codeName"], Util.NULL_STRING).ToString();
            this.m_codeValue = Util.ReplaceDBNullTo(dRow["codeValue"], Util.NULL_STRING).ToString();
            this.m_contents = Util.ReplaceDBNullTo(dRow["contents"], Util.NULL_STRING).ToString();
            this.m_codeType = Util.ReplaceDBNullTo(dRow["codeType"], Util.NULL_STRING).ToString();
            this.m_info = Util.ReplaceDBNullTo(dRow["info"], Util.NULL_STRING).ToString();
        }
        #endregion

        #region ATTRIBUTES
        private int m_codeID;
        private string m_codeName;
        private string m_codeValue;
        private string m_contents;
        private string m_codeType;
        private string m_info;
        #endregion

        #region PROPERTIES
        public int CodeID
        {
            get
            {
                return this.m_codeID;
            }
            set
            {
                this.m_codeID = value;
            }
        }

        public string CodeName
        {
            get
            {
                return this.m_codeName;
            }
            set
            {
                this.m_codeName = value;
            }
        }

        public string CodeValue
        {
            get
            {
                return this.m_codeValue;
            }
            set
            {
                this.m_codeValue = value;
            }
        }

        public string Contents
        {
            get
            {
                return this.m_contents;
            }
            set
            {
                this.m_contents = value;
            }
        }

        public string CodeType
        {
            get
            {
                return this.m_codeType;
            }
            set
            {
                this.m_codeType = value;
            }
        }

        public string Info
        {
            get
            {
                return this.m_info;
            }
            set
            {
                this.m_info = value;
            }
        }

        #endregion

    }
}